/**
 * 自己的后端的API接口
 */


// import { pureGet } from "../common/ajax";
import Config from "../common/config";
import axios from "axios";



export const fetchList = (query) =>  axios({
    method: 'post',
    url: Config.backEndUrl+"/workpiece/getList",
    data: query
  });

export const updateWorkpiece = (workpiece) =>  axios({
    method: 'post',
    url: Config.backEndUrl+"/workpiece/update",
    data: workpiece
  });

  export const addWorkpiece = (workpiece) =>  axios({
    method: 'post',
    url: Config.backEndUrl+"/workpiece/add",
    data: workpiece
  });



  

  export const addWorkpieceCategory = (workpieceCategory) =>  axios({
    method: 'post',
    url: Config.backEndUrl+"/workpiece/addCategory",
    data: workpieceCategory
  });
// export function fetchList(query) {
//   // console.log(query)
//   return request({
//     url: '/workpiece/getList',
//     method: 'post',
//     params: query
//   })
// }

// export function updateWorkpiece(workpiece) {
//   return request({
//     url: '/workpiece/update',
//     method: 'post',
//     params: workpiece
//   })
// }